<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminAttachmentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_attachment', function (Blueprint $table) {
            $table->increments('id');
            $table->string('module')->nullable()->comment('模块');
            $table->string('type')->nullable()->comment('文件类型');
            $table->string('driver')->nullable()->comment('驱动');
            $table->string('name')->default('')->comment('文件名');
            $table->string('path')->default('')->comment('文件路径');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_attachment');
    }
}
